import org.springframework.core.io.ClassPathResource
import org.springframework.core.io.support.PropertiesLoaderUtils

def Properties property = PropertiesLoaderUtils.loadProperties(new ClassPathResource("config.properties"))
grails {
	mongo {
		host = property.getProperty("db_host")
		port = property.getProperty("db_port").toInteger()
		databaseName = property.getProperty("db_name")
		username = property.getProperty("db_username")
		password = property.getProperty("db_password")		

		options {
			autoConnectRetry = true
			connectTimeout = 3000
			connectionsPerHost = 10000
			socketTimeout = 60000
			threadsAllowedToBlockForConnectionMultiplier = 5000
			maxAutoConnectRetryTime = 5
			maxWaitTime = 120000
		}
	}
}
